<template>
  <el-menu
    class="el-menu-vertical"
    unique-opened
    :default-active="defaultActive"
    :collapse="asideVisible"
    @select="menuSelect"
  >
    <template v-for="item in menuList">
      <el-submenu
        v-if="item['children'] && item['children'].length > 0"
        :key="item['id']"
        :index="item['path']"
      >
        <template slot="title">
          <i :class="item['icon']"></i>
          <span>{{ item["title"] }}</span>
        </template>
        <template v-for="ite in item['children']">
          <el-menu-item :key="ite['id']" :index="ite['path']">{{
            ite["title"]
          }}</el-menu-item>
        </template>
      </el-submenu>
      <el-menu-item v-else :key="item['id']" :index="item['path']">
        <i :class="item['icon']"></i>
        <span>{{ item["title"] }}</span>
      </el-menu-item>
    </template>
  </el-menu>
</template>

<script lang="ts">
import Aside from "./dist/aside.components";
export default Aside;
</script>

<style lang="stylus">
@import "./dist/style";
</style>
